<admintpl file="header" />
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
  <ul class="nav nav-tabs">
     <li class="active"><a href="{:U('AdminPage/index')}">所有页面</a></li>
     <li><a href="{:U('AdminPage/add')}">添加页面</a></li>
  </ul>
  <form class="well form-search" method="post" action="{:u('AdminPage/index')}">
    <div class="search_type cc mb10">
      <div class="mb10"> 
        <span class="mr20">时间：
        <input type="text" name="start_time" class="input length_2 J_date" value="{$formget.start_time}" style="width:80px;" autocomplete="off">-<input autocomplete="off" type="text" class="input length_2 J_date" name="end_time" value="{$formget.end_time}" style="width:80px;">
        <!-- 
        <select class="select_2" name="posids"style="width:70px;">
          <option value='' selected>全部</option>
        </select>
        <select class="select_2" name="searchtype" style="width:70px;">
          <option value='0' >标题</option>
        </select>
         -->
                           关键字：
        <input type="text" class="input length_2" name="keyword" style="width:200px;" value="{$formget.keyword}" placeholder="请输入关键字...">
        <button class="btn">搜索</button>
        </span>
      </div>
    </div>
  </form>
  <form class="J_ajaxForm" action="" method="post">
    <div class="table_list">
      <table width="100%" class="table table-hover">
        <thead>
	          <tr>
	            <th width="16"><label><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x"></label></th>
	            <th width="100">ID</th>
	            <th>标题</th>
	            <!-- <th>点击量</th> -->
	            <th width="80">发布人</th>
	            <th width="120"><span>发布时间</span></th>
	            <th width="120">操作</th>
	          </tr>
	    </thead>
        	<foreach name="posts" item="vo">
	        	<tr>
		            <td><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="ids[]" value="{$vo.id}"></td>
		            <td><a>{$vo.id}</a></td>
		            <td>
		            	<a href="{:U('portal/page/index',array('id'=>$vo['id']))}" target="_blank"><span>{$vo.post_title}</span></a>
		            </td>
		           <!--  <td>0</td> -->
		            <td>{$users[$vo['post_author']]['user_login']}</td>
		            <td>{$vo.post_date}</td>
		            <td>
		            	<a href="{:U('AdminPage/edit',array('id'=>$vo['id']))}" target="_blank" >修改</a>|
		            	<a href="{:U('AdminPage/delete',array('id'=>$vo['id']))}" class="J_ajax_del" >删除</a>
					</td>
	          	</tr>
          </foreach>
          </table>
      		<div class="pagination">{$Page}</div>
     
    </div>
    <div class="form-actions">
        <label class="checkbox inline" for="check_all"><input type="checkbox" class="J_check_all" data-direction="y" data-checklist="J_check_y" id="check_all">全选</label>                
        <button class="btn J_ajax_submit_btn btn-primary" type="submit" data-action="{:U('AdminPage/delete')}" data-subcheck="true">删除</button>
      </div>
  </form>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
<script>
setCookie('refersh_time', 0);
function refersh_window() {
    var refersh_time = getCookie('refersh_time');
    if (refersh_time == 1) {
        window.location.reload();
    }
}
setInterval(function(){
	refersh_window()
}, 2000);

</script>
</body>
</html>